from django.urls import re_path
from . import views

urlpatterns = [
    # 获取省份信息:
    re_path(r'^areas/$', views.ProvinceAreasView.as_view()),

    # 子级地区
    re_path(r'^areas/(?P<pk>[1-9]\d+)/$', views.SubAreasView.as_view()),

    # 展示地址
    re_path(r'^addresses/$', views.AddressView.as_view()),

    # 修改和删除收货地址
    re_path(r'^addresses/(?P<address_id>\d+)/$', views.UpdateDestroyAddressView.as_view()),

    # 设置默认地址
    re_path(r'^addresses/(?P<address_id>\d+)/default/$', views.DefaultAddressView.as_view()),

    # 修改地址标题
    re_path(r'^addresses/(?P<address_id>\d+)/title/$', views.UpdateTitleAddressView.as_view()),

]